package app.server.project.cloud.random.dto.device;

import app.server.project.cloud.random.db.entity.UserDeviceEntity;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import jakarta.persistence.Column;
import lombok.Data;
import org.hibernate.annotations.Comment;

@Data
public class DevBaseDto {
    /**
     * 设备id
     */
    private long deviceId;
    /**
     *设备名称
     */
    private String name;
    /**
     * 设备类型id
     */
    private int devTypeId;
    /**
     * 房间id
     * @param
     * @return
     */
    private long roomId;

    public static DevBaseDto of(UserDeviceEntity deviceBaseEntity){
        var ret=new DevBaseDto();
        BeanUtil.copyProperties(deviceBaseEntity,ret,true);
        return ret;
    }
}
